<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JsUnit Tests</title>
    <link rel="stylesheet" type="text/css" href="../css/jsUnitStyle.css">
    <script language="JavaScript" type="text/javascript" src="../app/jsUnitCore.js"></script>
    <script language="JavaScript" type="text/javascript" src="../../lib/MJ.js"></script>
    <script language="JavaScript" type="text/javascript">
        function testIsSanshokudoukou1() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["2m", "2m", "2m", "2s", "2s", "2s",
	                  "2p", "2p", "2p", "7s", "7s", "7s",
			  "9s", "9s"], "7s");
            var agari_pattern = tehai.getAgariPattern();
	    assertTrue(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou2() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["3m", "3m", "3m", "3s", "3s", "3s",
	                  "3p", "3p", "3p", "7s", "8s", "9s",
			  "9p", "9p"], "3s");
            var agari_pattern = tehai.getAgariPattern();
	    assertTrue(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou3() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["1m", "2m", "3m", "3s", "3s", "3s",
	                  "3p", "3p", "3p", "7s", "8s", "9s",
			  "9p", "9p"], "3s");
            var agari_pattern = tehai.getAgariPattern();
	    assertFalse(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou4() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["1m", "2m", "3m", "3m", "3m", "3m",
	                  "3p", "3p", "3p", "3s", "3s", "3s",
			  "9p", "9p"], "3s");
            var agari_pattern = tehai.getAgariPattern();
	    assertTrue(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou5() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["3s", "3s", "3s", "3p", "3p", "3p",
	                  "4s", "4s", "4s", "1m", "2m", "3m",
			  "3m", "3m"], "4s");
            var agari_pattern = tehai.getAgariPattern();
	    assertFalse(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou6() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["1s", "1s", "1s", "1p", "1p", "1p",
	                  "4s", "4s", "4s", "1m", "2m", "3m",
			  "1m", "1m"], "4s");
            var agari_pattern = tehai.getAgariPattern();
	    assertFalse(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou7() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["2s", "2s", "2s", "2p", "2p", "2p",
	                  "4s", "4s", "4s", "1m", "2m", "3m",
			  "2m", "2m"], "4s");
            var agari_pattern = tehai.getAgariPattern();
	    assertFalse(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }

        function testIsSanshokudoukou8() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["9s", "9s", "9s", "9p", "9p", "9p",
	                  "9m", "9m", "9m", "1m", "2m", "3m",
			  "2m", "2m"], "4s");
            var agari_pattern = tehai.getAgariPattern();
	    assertTrue(MJ.Hantei._2Han.isSanshokudoukou(agari_pattern[0]));
        }
    </script>
</head>

<body>
<h1>MJ Tests</h1>

<p>This page contains tests for the JsUnit Framework. To see them, take a look at the source.</p>
</body>
</html>
